 <%--
 *  File:   PharmacyOutBuyDetail.jsp
 *  Desc:	the Lend slip summary page
 *
 *  Date		  Author		   Changes
 *  2011-6-20	  JackYin		  Created
 *
 *  Copyright (C) 2000 - 2005 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>
<%
  //init param
  String privilegeCode = "ALL";
  String strTableName = "v_zylpharmacyoutbuydetailsummary";
  String strModuleName = "COM";
  String contextPath = request.getContextPath();
%>
<%@ include file="/inc/CommonHeader.inc" %>
<%@ include file="/inc/OvalLocationDefault.inc" %>
<%@ include file="/rpt/ReportURL.inc" %>
<html>
<head>
<title>PharmacyOutBuyDetail</title>
<PageFlow:CheckPageFlow pageName="p_zylpharmacyoutbuydetail"/>
<%@ include file="/inc/CatchError.inc" %>
<%@ include file="/inc/SumDiv.inc" %>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contextPath%>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath%>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/SummaryDivision.js"></script>
<script language="JavaScript">
function page_summary(actionvalue,orderbyname)
{
  var editform = summaryPrepare(cform,actionvalue,orderbyname);
  if(!editform) return;
  editform.action = "PharmacyOutBuyDetail.jsp?<%= OvalTools.randomURL() %>";
  editform.target = "_self";
  isRunning = true;
  editform.submit();
}

function clickRow(obj,idx)
{
  var cform = document.cform;
  cform.radiorow[idx].checked=true;
  cform.historyofmonthsalesid.value = eval('obj.all.historyofmonthsalesid'+idx).value;
}

function page_close(){

	window.close(); 
}

</script>
</head>

<body style="overflow: auto;">
<form name="cform" method="post" action="<%=contextPath%>/Dispatcher">
    <input type="hidden" name="pagename" value="p_zylpharmacyoutbuydetail">
    <input type="hidden" name="actionname">
    <custom:hidden property="globalpccode"></custom:hidden>
     <custom:hidden property="partnerid"></custom:hidden>
  <custom:hidden property="productid"></custom:hidden>
   <custom:hidden property="year"></custom:hidden>
    <custom:hidden property="month"></custom:hidden>
<%--  page location   --%>
    <%@ include file="/inc/PageLocation.inc" %>

    <table width="100%" cellspacing="0" border="0" cellpadding="0">
      <tr>
<%--  search criteria  --%>
      </tr>  
      <tr>
        <td>
          <table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">

<%
    ArrayList titleTdArray = new ArrayList();
    titleTdArray.add(new TD("22","&nbsp;"));
    titleTdArray.add(new TitleTD("80","L_Date") );
    titleTdArray.add(new TitleTD("80","L_PharmacyCode"));
    titleTdArray.add(new TitleTD("150","L_PharmacyName"));
    titleTdArray.add(new TitleTD("150","L_CustomerBeforeName"));
    titleTdArray.add(new TitleTD("80","L_TerminalCode"));
    titleTdArray.add(new TitleTD("100","L_TerminalName"));
    titleTdArray.add(new TitleTD("70","L_Qty"));
    titleTdArray.add(new TitleTD("70","L_Status"));

 %>
    <custom:titletr styleClass="deepblue-left" tdArray="<%=titleTdArray%>" />


 <%
     ArrayList detailTdArray = new ArrayList();
     detailTdArray.add(new RadioTD());
     detailTdArray.add(new WriteTD("startdate","date","dateformat"));
     detailTdArray.add(new WriteTD("orgcode"));
     detailTdArray.add(new WriteTD("orgname"));
     detailTdArray.add(new WriteTD("custoriginame"));
     detailTdArray.add(new WriteTD("partnercode"));
     detailTdArray.add(new WriteTD("partnername"));
     detailTdArray.add(new WriteTD("qty"));
     detailTdArray.add(new WriteTD("statusname"));

     
     
     ArrayList hiddenArray = new ArrayList();
     hiddenArray.add(new HiddenInput("historyofmonthsalesid",true));

 %>
    <custom:iteratetr tdArray="<%=detailTdArray%>" hiddenArray="<%=hiddenArray%>"  dataSource="searchresults"/>
            <%@ include file="/inc/SummaryAction.inc" %>
          </table>
          <table width="100%" cellspacing="0" cellpadding="0">
            <tr><td class="summary_top"></td></tr>
            <tr>
              <td class="td_center">
                   <td class="td_center">
      

              	<a onclick="page_close();"><custom:button type="1" label="L_CloseWindow" imgsrc="back.gif" border="0" style="width:80"/></a>

             
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
</form>
</body>
</html>

